#!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
互联网访问
"""
from urllib.request import urlopen
with urlopen('https://www.baidu.com') as response:
    for line in response:
        line = line.decode('utf-8')
        if 'EST' in line or 'EDT' in line:
            print(line)


import smtplib
server = smtplib.SMTP('localhost')
server.sendmail('martonyang0707@163.com', '562576@hopson.com.cn'
                """To: 562576@hopson.com.cn
                From: martonyang0707@163.com
                
                Beware the Ides of March.""")
server.quit()
